/* ========== 专题活动列表页 ========== */

/* 区块容器 */
.latest-activities {
  padding: 60px 0 50px;
  background: #f7f8fa;
  min-height: 500px;
}

/* ---------- 区块标题 ---------- */
.latest-activities .section-header {
  text-align: center;
  margin-bottom: 48px;
}

.latest-activities .section-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-left: 0;
  margin-bottom: 10px;
}
.latest-activities .section-title-wrap::before {
  content: '';
  width: 4px;
  height: 28px;
  background: #A6CE39;
  border-radius: 2px;
  position: static;
  transform: none;
  flex-shrink: 0;
}
.latest-activities .section-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: .5px;
}

.latest-activities .section-subtitle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.latest-activities .section-subtitle-wrap .decor-img {
  width: 32px;
  height: auto;
  opacity: .35;
}
.latest-activities .section-subtitle {
  font-size: 13px;
  color: #bbb;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

/* ---------- 卡片网格 ---------- */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* ---------- 单张卡片 ---------- */
.activity-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
}
.activity-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

/* 封面图 */
.activity-img {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
}
.activity-img a {
  display: block;
  position: absolute;
  inset: 0;
}
.activity-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.activity-item:hover .activity-img img {
  transform: scale(1.06);
}

/* 状态角标 */
.activity-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  z-index: 2;
  letter-spacing: .5px;
}
.activity-badge.ongoing {
  background: rgba(166,206,57,.92);
  color: #fff;
}
.activity-badge.ended {
  background: rgba(0,0,0,.45);
  color: #fff;
}

/* 卡片文字区 */
.activity-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity-info h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-info h3 a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-info h3 a:hover {
  color: #A6CE39;
}

/* 日期 */
.activity-date {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.activity-date .layui-icon {
  font-size: 14px;
  color: #bbb;
}

/* 倒计时 / 状态行 */
.activity-time {
  margin-top: auto;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #666;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid #f5f5f5;
}
.activity-time > span {
  white-space: nowrap;
  flex-shrink: 0;
}

/* 倒计时数字块 */
.time-boxes {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.time-boxes span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 600;
  background: #A6CE39;
  color: #fff;
  border-radius: 4px;
}

/* 已结束状态 */
.activity-status {
  font-size: 13px;
  font-weight: 500;
}
.activity-status.ended {
  color: #ccc;
}

/* ---------- 加载 & 空状态 ---------- */
.promo-loading,
.no-data {
  text-align: center;
  padding: 80px 20px;
  color: #bbb;
  font-size: 15px;
}
.promo-loading::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border: 3px solid #e8e8e8;
  border-top-color: #A6CE39;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 分页 ---------- */
.discount-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
  padding: 10px 0 0;
}
.discount-pagination a,
.discount-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  color: #555;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  user-select: none;
}
.discount-pagination a:hover {
  border-color: #A6CE39;
  color: #A6CE39;
}
.discount-pagination .page-active {
  background: #A6CE39;
  border-color: #A6CE39;
  color: #fff;
  font-weight: 600;
}
.discount-pagination .page-disabled {
  color: #d0d0d0;
  cursor: not-allowed;
  border-color: #eee;
}
.discount-pagination .page-disabled:hover {
  border-color: #eee;
  color: #d0d0d0;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 1200px) {
  .activities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media screen and (max-width: 768px) {
  .latest-activities {
    padding: 36px 0 30px;
  }
  .latest-activities .section-title {
    font-size: 22px;
  }
  .latest-activities .section-header {
    margin-bottom: 28px;
  }
  .activities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .activity-info {
    padding: 14px;
  }
  .activity-info h3 {
    font-size: 14px;
  }
  .activity-date,
  .activity-time {
    font-size: 12px;
  }
  .time-boxes span {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
  }
  .activity-badge {
    font-size: 11px;
    padding: 3px 10px;
    top: 8px;
    left: 8px;
  }
}
@media screen and (max-width: 480px) {
  .activities-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
